import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
  public msg:any;
  public username:any;

  public flag:any;
  constructor() { }

  ngOnInit(): void {
    this.msg="112";
    this.username="zhangsan";
    this.flag=false;
  }
  getMsg(){
    console.log(this.msg);
  }
  setUsername(){
    this.username="lisi"
    console.log(this.username)
  }

  getKeyCode($event: KeyboardEvent){
    console.log($event)
  }
  getEvent(e:any){
    console.log(e)
  }
}
